﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AdaptiveDeNet.Functions
{
    public class CEC14FuncImpl : Function
    {
        private int funcNum;
        private int dim;
        private CEC14Lib.CEC14func cec14;

        public void Destroy()
        {
            //cec14.Clean();
            GC.SuppressFinalize(this);

        }

        public CEC14FuncImpl(int funcNum, int dim)
        {
            this.funcNum = funcNum;
            this.dim = dim;
            cec14 = new CEC14Lib.CEC14func(dim, funcNum);
        }

        #region Function Members

        public double Feval(double[] x)
        {
            return cec14.FEval(x, dim, funcNum);
        }

        #endregion
    }
}
